<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Route;
// restful风格API

Route::resource(':version/app','app/:version.APP');
Route::resource(':version/user','app/:version.User');
Route::resource(':version/address','app/:version.Address');
Route::resource(':version/orders','app/:version.Orders');
Route::resource(':version/store','app/:version.Store');
Route::resource(':version/goods','app/:version.Goods');
Route::resource(':version/pocket','app/:version.Pocket');
Route::resource(':version/usercoupon','app/:version.UserCoupon');


//app
//登录
Route::rule(':version/login','app/:version.App/login');
//微信验证
Route::rule(':version/wxcheck','app/:version.App/wxCheck');
//测试
Route::rule(':version/test','app/:version.App/test');



//用户
//用户中心
Route::rule(':version/usercenter','app/:version.User/UserCenter');




//地址
//新增地址
Route::rule(':version/addnewaddress','app/:version.Address/addNewAddress');
//我的地址
Route::rule(':version/getalladdress','app/:version.Address/getAllAddress');
//删除地址
Route::rule(':version/addressdelete','app/:version.Address/AddressDelete');
//更新地址
Route::rule(':version/addressupdate','app/:version.Address/AddressUpdate');




//订单
//结算
Route::rule(':version/settlement','app/:version.Orders/Settlement');
//我的订单
Route::rule(':version/orders','app/:version.Orders/index','OPTIONS');
//下单
Route::rule(':version/order','app/:version.Orders/order');
//支付回调
Route::rule(':version/notifyurl','app/:version.Orders/notifyUrl');
//订单详情
Route::rule(':version/orderdetails','app/:version.Orders/OrderDetails');



//商户
//商户列表
Route::rule(':version/store','app/:version.Store/index','OPTIONS');
//新增商户
Route::rule(':version/addstore','app/:version.Store/addStore');




//商品
//商品列表
Route::rule(':version/goods','app/:version.Goods/index','OPTIONS');
//添加商品
Route::rule(':version/addgoods','app/:version.Goods/addGoods');



//口袋
//购物车
Route::rule(':version/shoppingcart','app/:version.Pocket/shoppingCart');




//优惠券
//我的优惠券
Route::rule(':version/usercoupon','app/:version.UserCoupon/index','OPTIONS');